package com.example.aipDriver.service;

import com.example.aipDriver.remote.ServiceDriverUserClient;
import com.example.internalcommon.dto.DriverCarBindingRelationship;
import com.example.internalcommon.dto.DriverUser;
import com.example.internalcommon.dto.DriverUserWorkStatus;
import com.example.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.xml.crypto.Data;

/**
 * @Author lyra
 * @Date 2023/4/12 17:13
 **/
@Service
public class UserService {

    @Autowired
    private ServiceDriverUserClient serviceDriverUserClient;

    public ResponseResult updateUser(DriverUser driverUser){
        return serviceDriverUserClient.updateUser(driverUser);
    }

    public ResponseResult changeWorkStatus(DriverUserWorkStatus driverUserWorkStatus) {
        return serviceDriverUserClient.changeWorkStatus(driverUserWorkStatus);
    }

    public ResponseResult<DriverCarBindingRelationship>  getDriverCarBindingRelationship(String driverPhone){
        // 根据driverPhone查询司机信息
        return serviceDriverUserClient.getDriverCarBindingRelationship(driverPhone);
    }

    public ResponseResult<DriverUserWorkStatus> getWorkStatus(String driverId) {
        return serviceDriverUserClient.getWorkStatus(driverId);
    }
}
